/**
 * @description: bandwidth type管理
 */

import type { CommonAPI } from '@/apis/types/all.ts'
import { defHttp } from '@/apis/http'

/** 删除bandwidth type */
export const deleteBandwidthTypeApi: CommonAPI<
  '/v1/bandwidth_type',
  'delete'
> = params => defHttp.delete(`/v1/bandwidth_type`, { params })

/** 创建bandwidth type */
export const addBandwidthTypeApi: CommonAPI<
  '/v1/bandwidth_type',
  'post'
> = data => defHttp.post(`/v1/bandwidth_type`, data)

/** 修改bandwidth type */
export const updateBandwidthTypeApi: CommonAPI<
  '/v1/bandwidth_type',
  'put'
> = data => defHttp.put(`/v1/bandwidth_type`, data)

/** 修改bandwidth type排序 */
export const updateBandwidthTypeIndexApi: CommonAPI<
  '/v1/bandwidth_type/index',
  'post'
> = data => defHttp.post(`/v1/bandwidth_type/index`, data)

/** 列表bandwidth type */
export const getBandwidthTypeListApi: CommonAPI<
  '/v1/bandwidth_type/list',
  'get'
> = params => defHttp.get(`/v1/bandwidth_type/list`, { params })
